<!--{eval $_TPL['titles'] = array('邀请注册');}-->
<!--{template header_tpl}-->
<div class="grid_24 ">
	<form action="{SITEURL}register/invite/{$get_email}/{$invitecode}" method="post" accept-charset="utf-8" id="inviteform">
		<div class="grid_24">
			<table class="formtable">
				<tr>
					<th width="25%">邀请码</th>
					<td><input id="invitecode" type="text" value="{$invitecode}" name="invitecode" class="textinput" disabled /></td>
					<td>
						<!--{if $invitecodemsg}-->
							<span class="error">{$invitecodemsg}</span>
						<!--{/if}-->
					</td>
				</tr>
				<tr>
					<th>Email(登录名称)</th>
					<td><input id="username" type="text" value="$email" name="username" class="textinput" disabled /></td>
					<td>
						<!--{if $usernamemsg}-->
							<span class="error">{$usernamemsg}&nbsp;</span>
						<!--{/if}-->
					</td>
				</tr>
				<tr>
					<th>姓名（请使用真实姓名）:</th>
					<td><input id="name" type="text" value="" name="name" class="textinput"></td>
					<td>&nbsp;</td>
				</tr>
				<tr>
					<th>一句话介绍（ 公司/职业，专业领域、兴趣爱好等）</th>
					<td><textarea id="intro" value="" name="intro" class="areainput"></textarea></td>
					<td>&nbsp;</td>
				</tr>
				<tr>
					<th>密码（至少6位）</th>
					<td><input id="password" type="password" value="" name="password" class="textinput"></td>
					<td>&nbsp;</td>
				</tr>
				<tr>
					<th>确认密码</th>
					<td><input id="repassword" type="password" value="" name="repassword" class="textinput"></td>
					<td>&nbsp;</td>
				</tr>
				<tr>
					<td><input type="checkbox" checked> 同意T<a href="#" target="_blank">大爷协议</a></td>
					<td colspan="2">
						<!--{if !empty($invitecodemsg) || !empty($usernamemsg) }-->
							无法完成注册
						<!--{else}-->
						<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
						<input type="submit" value="完成注册" name="invitesubmit">
						<!--{/if}-->
					</td>
				</tr>
			</table>

		</div>

	</form>
</div>
<script src="<!--{eval echo base_url();}-->resources/js/jquery.validate.min.js" type="text/javascript"></script>
<script src="<!--{eval echo base_url();}-->resources/js/validate.messages_cn.js" type="text/javascript"></script>
<script src="<!--{eval echo base_url();}-->resources/js/validate.additional-methods.min.js" type="text/javascript"></script>
<script src="<!--{eval echo base_url();}-->resources/js/jquery.form.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
	var validator = $("#inviteform").validate({
		onfocusout:false,
		errorElement:"span",
		rules: {
			name: {
				required: true,
				rangelength:[1,5] 
			},
			intro: {
				required: true,
				rangelength:[1,255]
			},
			password:{
				required: true,
				rangelength:[6,18]
			},
			repassword:{
				required: true,
				rangelength:[6,18],
				equalTo:"#password"
			}
			
		},
		messages: {
			name: {
				required: "请输入真实姓名",
				rangelength: $.validator.format("长度 为{0} - {1} 个汉字")
			},
			intro: {
				required: "请输入介绍",
				rangelength: $.validator.format("介绍长度 为{0} 到 {1} 个汉字")
			},
			password: {
				required: "请输入密码",
				rangelength: $.validator.format("密码长度 为{0} 到 {1} 位")
			},
			repassword: {
				required: "请确认密码",
				rangelength: $.validator.format("密码长度 为{0} 到 {1} 位"),
				equalTo: "两次输入密码不相同"
			}
			
		},
		errorPlacement: function(error, element) {
			error.appendTo(element.parent("td").next("td"));
		},
		highlight: function(element, errorClass) {
				$(element).fadeOut(function() {
				$(element).fadeIn();
			});
		},
		success: function(label) {
		}
	});
});
</script>
<!--{template footer_tpl}-->